#include <iostream>
#include <vector>
using namespace std;

void InsertSort(vector<int>& vc, int left, int right) 
{
	for (int i = left + 1; i <= right; i++)
	{
		int key = vc[i];
		int j = i - 1;
		while (j >= 0 && vc[j] > key)
		{
			vc[j + 1] = vc[j];
			j--;
		}
		vc[j + 1] = key;
	}
}
int main()
{
	vector<int> vc = { 2, 3, 5, 6, 3, 1, 7, 6, 2, 8, 9 };
	InsertSort(vc, 0, vc.size() - 1);
	for (auto e : vc)
	{
		cout << e << " ";
	}
	return 0;
}